<script setup lang="js">
import { ref } from 'vue'
import { useI18n } from 'vue-i18n'
import DataEMap from "../../components/elderlyData/dataE-map.vue"
import Drawer from "../../components/elderlyData/drawer.vue"

const { t } = useI18n()

// 类别
const category = "E"
const userId = ref()
const flag = ref(false)

const getParameter = async (newUserId, newFlag) => {
  userId.value = newUserId
  flag.value = newFlag
}

</script>

<template>
  <div class="elderly-analyze-container">
    <div class="page-header">
      <h1>{{ $t('elderlyAnalysisTitle') }}</h1>
    </div>
    <el-card class="analysis-card">
      <data-e-map :category="category" @sendMessage="getParameter"></data-e-map>
      <Drawer :user-id="userId" v-model:flag="flag"></Drawer>
    </el-card>
  </div>
</template>

<style scoped lang="less">

</style>
